Optimal. Leaf size=54 \[ \frac {a \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {i a \sec ^3(c+d x)}{3 d}+\frac {a \sec (c+d x) \tan (c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {3567, 3853,
3855} \begin {gather*} \frac {i a \sec ^3(c+d x)}{3 d}+\frac {a \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {a \tan (c+d x) \sec (c+d x)}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3567
Rule 3853
Rule 3855
Rubi steps
\begin {align*} \int \sec ^3(c+d x) (a+i a \tan (c+d x)) \, dx &=\frac {i a \sec ^3(c+d x)}{3 d}+a \int \sec ^3(c+d x) \, dx\\ &=\frac {i a \sec ^3(c+d x)}{3 d}+\frac {a \sec (c+d x) \tan (c+d x)}{2 d}+\frac {1}{2} a \int \sec (c+d x) \, dx\\ &=\frac {a \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {i a \sec ^3(c+d x)}{3 d}+\frac {a \sec (c+d x) \tan (c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 54, normalized size = 1.00 \begin {gather*} \frac {a \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {i a \sec ^3(c+d x)}{3 d}+\frac {a \sec (c+d x) \tan (c+d x)}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.30, size = 51, normalized size = 0.94
method | result | size |
derivativedivides | \(\frac {\frac {i a}{3 \cos \left (d x +c \right )^{3}}+a \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) | \(51\) |
default | \(\frac {\frac {i a}{3 \cos \left (d x +c \right )^{3}}+a \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) | \(51\) |
risch | \(-\frac {i a \left (3 \,{\mathrm e}^{5 i \left (d x +c \right )}-8 \,{\mathrm e}^{3 i \left (d x +c \right )}-3 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{3 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{3}}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{2 d}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{2 d}\) | \(94\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 61, normalized size = 1.13 \begin {gather*} -\frac {3 \, a {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - \frac {4 i \, a}{\cos \left (d x + c\right )^{3}}}{12 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 180 vs. \(2 (46) = 92\).
time = 0.38, size = 180, normalized size = 3.33 \begin {gather*} \frac {-6 i \, a e^{\left (5 i \, d x + 5 i \, c\right )} + 16 i \, a e^{\left (3 i \, d x + 3 i \, c\right )} + 6 i \, a e^{\left (i \, d x + i \, c\right )} + 3 \, {\left (a e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, a e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, a e^{\left (2 i \, d x + 2 i \, c\right )} + a\right )} \log \left (e^{\left (i \, d x + i \, c\right )} + i\right ) - 3 \, {\left (a e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, a e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, a e^{\left (2 i \, d x + 2 i \, c\right )} + a\right )} \log \left (e^{\left (i \, d x + i \, c\right )} - i\right )}{6 \, {\left (d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} i a \left (\int \left (- i \sec ^{3}{\left (c + d x \right )}\right )\, dx + \int \tan {\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 97 vs. \(2 (46) = 92\).
time = 0.46, size = 97, normalized size = 1.80 \begin {gather*} \frac {3 \, a \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right ) - 3 \, a \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right ) + \frac {2 \, {\left (3 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 6 i \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 3 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 i \, a\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{3}}}{6 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.13, size = 107, normalized size = 1.98 \begin {gather*} \frac {a\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {-a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+2{}\mathrm {i}\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+\frac {a\,2{}\mathrm {i}}{3}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________